package com.example.meetdroid;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
	public class MainSwipe extends TabActivity {
		 
		public void onCreate(Bundle savedInstanceState) {
			super.onCreate(savedInstanceState);
			setContentView(R.layout.main_swipe);
	 
			Resources ressources = getResources(); 
			TabHost tabHost = getTabHost(); 
	 
			// AddUser tab
			Intent intentAddFriend = new Intent().setClass(this, AddUserActivity.class);
			TabSpec tabSpecAddFriend = tabHost
			  .newTabSpec("AddFriend")
			  .setIndicator("", ressources.getDrawable(R.drawable.ic_action_user_add))
			  .setContent(intentAddFriend);
	 
			// FriendList tab
			Intent itentFriendList = new Intent().setClass(this, ActivityFriendList.class);
			TabSpec tabSpecFriendList = tabHost
			  .newTabSpec("FriendList")
			  .setIndicator("", ressources.getDrawable(R.drawable.ic_action_user))
			  .setContent(itentFriendList);
			//MeetMap tab
			Intent itentMap = new Intent().setClass(this, MapPane.class);
			TabSpec tabSpecMap = tabHost
			  .newTabSpec("MeetMap")
			  .setIndicator("", ressources.getDrawable(R.drawable.ic_action_locate))
			  .setContent(itentMap);
	 
						// add all tabs 
			tabHost.addTab(tabSpecAddFriend);
			tabHost.addTab(tabSpecFriendList);
			tabHost.addTab(tabSpecMap);
	 
			//set Windows tab as default (zero based)
			tabHost.setCurrentTab(0);
		}
	 
	}